import { Column, DeleteDateColumn, Entity, PrimaryGeneratedColumn } from "typeorm"

@Entity({ name: "authorization", engine: "InnoDB" })
export class AuthorizationEntity {
  // index
  @PrimaryGeneratedColumn({ type: "int" })
  id: number

  // user id
  @Column({ type: "int" })
  user_id: number

  // application name
  @Column({ type: "varchar" })
  app_name: string

  // application id
  @Column({ type: "int" })
  app_id: number

  // body
  @Column({ type: "varchar" })
  body: string

  // status
  @Column({ type: "int" })
  status: number

  // verify type
  @Column({ type: "int" })
  type: number

  // over date
  @Column({ type: "date" })
  over_date: string

  // create date
  @Column({ type: "date" })
  create_date: string

  // soft deletion tag
  @DeleteDateColumn({ nullable: true })
  deleteAt: Date
}
